package com.lzx.ai.controller;

import com.lzx.ai.template.FaceTemplate;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author 程序员星星
 * @date 2022/12/17
 * @Description
 */
@RestController
@RequestMapping("/ai/face/web")
public class FaceController {
    @Resource
    private FaceTemplate faceTemplate;

    //人脸识别
    @PostMapping("/detect")
    public boolean detect(@RequestParam("imageUrl") String imageUrl) {
        return faceTemplate.detect(imageUrl);
    }
}
